import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { AbmModule } from "angular-baidu-maps";
import { NgxEchartsModule } from "ngx-echarts";
import { MetaChartMapComponent } from "./meta/meta-chart-map/meta-chart-map.component";
import { MetaTableComponent } from "./meta/meta-table/meta-table.component";
import { MetaTreetableComponent } from "./meta/meta-treetable/meta-treetable.component";
import { MetaInputComponent } from "./meta/meta-input/meta-input.component";
import { MetaSearchComponent } from "./meta/meta-search/meta-search.component";
import { MetaFormComponent } from "./meta/meta-form/meta-form.component";
import { EnumPipe } from "../pipe/enum.pipe";
import { RequiredDirective } from "../directive/required.directive";
import { NgZorroAntdModule, NZ_I18N, zh_CN } from "ng-zorro-antd";
import { FormsModule, ReactiveFormsModule } from "@angular/forms";
import { LoginComponent } from "./login/login.component";
import { PersonInfoComponent } from "./logininfo/personinfo.component";
import { UpdatepwdComponent } from "./logininfo/updatepwd.component";
import { RegisterComponent } from "./register/register.component";
import { RouteReuseStrategy } from "@angular/router";
import { CustomReuseStrategy } from "./main/customreusestrategy";
import { DefaultComponent } from "./default/default.component";
import { DefalutDialogComponent } from "./default/defalut-dialog/defalut-dialog.component";
import { MetaChartMapChinaComponent } from "./meta/meta-chart-map-china/meta-chart-map-china.component";

@NgModule({
  declarations: [
    LoginComponent,
    PersonInfoComponent,
    UpdatepwdComponent,
    RegisterComponent,
    DefaultComponent,
    MetaChartMapComponent,
    MetaTableComponent,
    MetaTreetableComponent,
    MetaInputComponent,
    MetaSearchComponent,
    MetaFormComponent,
    EnumPipe,
    RequiredDirective,
    DefalutDialogComponent,
    MetaChartMapChinaComponent
  ],
  imports: [
    CommonModule,
    FormsModule,
    ReactiveFormsModule,
    NgZorroAntdModule,
    AbmModule.forRoot({
      apiKey: 'D7f130ce4be999b80a56cfd12ab06a7a'
    }),
    NgxEchartsModule
  ],
  exports: [
    MetaChartMapComponent,
    MetaTableComponent,
    MetaTreetableComponent,
    MetaInputComponent,
    MetaSearchComponent,
    MetaFormComponent,
    EnumPipe,
    RequiredDirective,
    MetaChartMapChinaComponent
  ],
  entryComponents: [
    PersonInfoComponent,
    UpdatepwdComponent,
    DefalutDialogComponent,
    MetaChartMapChinaComponent
  ],
  providers: [
    { provide: NZ_I18N, useValue: zh_CN },
    { provide: RouteReuseStrategy, useClass: CustomReuseStrategy }
  ],
})
export class FrameworkModule {
}
